<template>
	<div class="content">
		<uni-table ref="table" :loading="loading" border stripe  emptyText="暂无更多数据" >
			<uni-tr>
				<uni-td  align="center">编号</uni-td>
				<uni-td  align="center">型号</uni-td>
				<uni-td  align="center">数量 </uni-td>
				<uni-td  align="center">数量 </uni-td>
				<uni-td  align="center">数量 </uni-td>
				<uni-td  align="center">数量 </uni-td>
				<uni-td  align="center">数量 </uni-td>
				<uni-td  align="center">数量 </uni-td>
				<uni-td  align="center">数量 </uni-td>
				<uni-td  align="center">数量 </uni-td>
			</uni-tr>
			<uni-tr>
				<uni-td align="center">1</uni-td>
				<uni-td align="center">2</uni-td>
				<uni-td align="center">3</uni-td>
			</uni-tr>
		</uni-table>
		
		
		<ScanCode></ScanCode>
	</div>
</template>

<script>
	import ScanCode from '@/components/scanCode/index.vue'
	export default {
		components: {
			ScanCode
		},
		data() {
			return {
				loading:false
			}
		},
		onShow: function() {
			var _this = this
			uni.$off('scancodedate') // 每次进来先 移除全局自定义事件监听器  
			uni.$on('scancodedate', function(data) {
			console.log(data.code,'data.code为扫码内容')
			uni.showLoading({
					title: data.code
				})
			uni.hideLoading();
			})
		},
		onUnload() {
			uni.$off('scancodedate')
		}
	}
</script>
